<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateRelationsTable extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up() {
		Schema::create('relations', function (Blueprint $table) {
			$table->increments('id');
			$table->integer('type_id')->comment('渠道id');
			$table->string('order_id', 10)->comment('订单id对应的key');
			$table->string('contacts', 10)->comment('联系人对应的key');
			$table->string('phone', 11)->comment('联系电话对应的key');
			$table->string('order_time', 10)->comment('订单下单时间对应的key');
			$table->string('price', 10)->comment('订单金额对应的key');
			$table->string('products', 50)->comment('订单商品信息对应的key');
			$table->string('receipt_name', 10)->comment('收货人对应的key');
			$table->string('receipt_address', 10)->comment('收货地址对应的key');
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down() {
		Schema::dropIfExists('relations');
	}
}
